<?php

/**
 * ViviendasAlquileres form base class.
 *
 * @method ViviendasAlquileres getObject() Returns the current form's model object
 *
 * @package    costabravasfr
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseViviendasAlquileresForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                 => new sfWidgetFormInputHidden(),
      'usuario_id'         => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Usuario'), 'add_empty' => false)),
      'orderid'            => new sfWidgetFormInputText(),
      'nombre'             => new sfWidgetFormInputText(),
      'apart_casa'         => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2', 3 => '3'))),
      'ambito'             => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1'))),
      'capacidad'          => new sfWidgetFormInputText(),
      'numplantas'         => new sfWidgetFormInputText(),
      'desc_ca'            => new sfWidgetFormTextarea(),
      'desc_ca_red'        => new sfWidgetFormTextarea(),
      'desc_es'            => new sfWidgetFormTextarea(),
      'desc_es_red'        => new sfWidgetFormTextarea(),
      'desc_en'            => new sfWidgetFormTextarea(),
      'desc_en_red'        => new sfWidgetFormTextarea(),
      'desc_nl'            => new sfWidgetFormTextarea(),
      'desc_nl_red'        => new sfWidgetFormTextarea(),
      'desc_fr'            => new sfWidgetFormTextarea(),
      'desc_fr_red'        => new sfWidgetFormTextarea(),
      'desc_de'            => new sfWidgetFormTextarea(),
      'desc_de_red'        => new sfWidgetFormTextarea(),
      'desc_it'            => new sfWidgetFormTextarea(),
      'desc_it_red'        => new sfWidgetFormTextarea(),
      'diacambio'          => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7'))),
      'activoGM'           => new sfWidgetFormInputCheckbox(),
      'geolatitud'         => new sfWidgetFormInputText(),
      'geolongitud'        => new sfWidgetFormInputText(),
      'preciomin'          => new sfWidgetFormInputText(),
      'habitaciones'       => new sfWidgetFormInputText(),
      'banos'              => new sfWidgetFormInputText(),
      'tv'                 => new sfWidgetFormInputCheckbox(),
      'wifi'               => new sfWidgetFormInputCheckbox(),
      'satelite'           => new sfWidgetFormInputCheckbox(),
      'calefaccion'        => new sfWidgetFormInputCheckbox(),
      'aire'               => new sfWidgetFormInputCheckbox(),
      'lavadora'           => new sfWidgetFormInputCheckbox(),
      'lavavajillas'       => new sfWidgetFormInputCheckbox(),
      'microondas'         => new sfWidgetFormInputCheckbox(),
      'cafetera'           => new sfWidgetFormInputCheckbox(),
      'tostadora'          => new sfWidgetFormInputCheckbox(),
      'plancha'            => new sfWidgetFormInputCheckbox(),
      'dvd'                => new sfWidgetFormInputCheckbox(),
      'chimenea'           => new sfWidgetFormInputCheckbox(),
      'piscina'            => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'jardin'             => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'garaje'             => new sfWidgetFormChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'))),
      'parking'            => new sfWidgetFormInputCheckbox(),
      'animales'           => new sfWidgetFormInputCheckbox(),
      'terraza'            => new sfWidgetFormInputCheckbox(),
      'mueblesjardin'      => new sfWidgetFormInputCheckbox(),
      'barbacoa'           => new sfWidgetFormInputCheckbox(),
      'vistas'             => new sfWidgetFormInputCheckbox(),
      'accesominusvalidos' => new sfWidgetFormInputCheckbox(),
      'distplaya'          => new sfWidgetFormInputText(),
      'activo'             => new sfWidgetFormInputCheckbox(),
      'galeria'            => new sfWidgetFormInputCheckbox(),
      'calendario'         => new sfWidgetFormInputCheckbox(),
      'fechaInicioCal'     => new sfWidgetFormDate(),
      'fechaFinCal'        => new sfWidgetFormDate(),
      'zona_id'            => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Zonas'), 'add_empty' => true)),
      'created_at'         => new sfWidgetFormDateTime(),
      'updated_at'         => new sfWidgetFormDateTime(),
      'slug'               => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'                 => new sfValidatorDoctrineChoice(array('model' => $this->getModelName(), 'column' => 'id', 'required' => false)),
      'usuario_id'         => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Usuario'))),
      'orderid'            => new sfValidatorInteger(array('required' => false)),
      'nombre'             => new sfValidatorString(array('max_length' => 50)),
      'apart_casa'         => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2', 3 => '3'), 'required' => false)),
      'ambito'             => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1'), 'required' => false)),
      'capacidad'          => new sfValidatorInteger(),
      'numplantas'         => new sfValidatorInteger(array('required' => false)),
      'desc_ca'            => new sfValidatorString(array('required' => false)),
      'desc_ca_red'        => new sfValidatorString(array('required' => false)),
      'desc_es'            => new sfValidatorString(array('required' => false)),
      'desc_es_red'        => new sfValidatorString(array('required' => false)),
      'desc_en'            => new sfValidatorString(array('required' => false)),
      'desc_en_red'        => new sfValidatorString(array('required' => false)),
      'desc_nl'            => new sfValidatorString(array('required' => false)),
      'desc_nl_red'        => new sfValidatorString(array('required' => false)),
      'desc_fr'            => new sfValidatorString(array('required' => false)),
      'desc_fr_red'        => new sfValidatorString(array('required' => false)),
      'desc_de'            => new sfValidatorString(array('required' => false)),
      'desc_de_red'        => new sfValidatorString(array('required' => false)),
      'desc_it'            => new sfValidatorString(array('required' => false)),
      'desc_it_red'        => new sfValidatorString(array('required' => false)),
      'diacambio'          => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7'), 'required' => false)),
      'activoGM'           => new sfValidatorBoolean(array('required' => false)),
      'geolatitud'         => new sfValidatorNumber(array('required' => false)),
      'geolongitud'        => new sfValidatorNumber(array('required' => false)),
      'preciomin'          => new sfValidatorNumber(array('required' => false)),
      'habitaciones'       => new sfValidatorInteger(array('required' => false)),
      'banos'              => new sfValidatorInteger(array('required' => false)),
      'tv'                 => new sfValidatorBoolean(array('required' => false)),
      'wifi'               => new sfValidatorBoolean(array('required' => false)),
      'satelite'           => new sfValidatorBoolean(array('required' => false)),
      'calefaccion'        => new sfValidatorBoolean(array('required' => false)),
      'aire'               => new sfValidatorBoolean(array('required' => false)),
      'lavadora'           => new sfValidatorBoolean(array('required' => false)),
      'lavavajillas'       => new sfValidatorBoolean(array('required' => false)),
      'microondas'         => new sfValidatorBoolean(array('required' => false)),
      'cafetera'           => new sfValidatorBoolean(array('required' => false)),
      'tostadora'          => new sfValidatorBoolean(array('required' => false)),
      'plancha'            => new sfValidatorBoolean(array('required' => false)),
      'dvd'                => new sfValidatorBoolean(array('required' => false)),
      'chimenea'           => new sfValidatorBoolean(array('required' => false)),
      'piscina'            => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'jardin'             => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'garaje'             => new sfValidatorChoice(array('choices' => array(0 => '0', 1 => '1', 2 => '2'), 'required' => false)),
      'parking'            => new sfValidatorBoolean(array('required' => false)),
      'animales'           => new sfValidatorBoolean(array('required' => false)),
      'terraza'            => new sfValidatorBoolean(array('required' => false)),
      'mueblesjardin'      => new sfValidatorBoolean(array('required' => false)),
      'barbacoa'           => new sfValidatorBoolean(array('required' => false)),
      'vistas'             => new sfValidatorBoolean(array('required' => false)),
      'accesominusvalidos' => new sfValidatorBoolean(array('required' => false)),
      'distplaya'          => new sfValidatorNumber(array('required' => false)),
      'activo'             => new sfValidatorBoolean(array('required' => false)),
      'galeria'            => new sfValidatorBoolean(array('required' => false)),
      'calendario'         => new sfValidatorBoolean(array('required' => false)),
      'fechaInicioCal'     => new sfValidatorDate(array('required' => false)),
      'fechaFinCal'        => new sfValidatorDate(array('required' => false)),
      'zona_id'            => new sfValidatorDoctrineChoice(array('model' => $this->getRelatedModelName('Zonas'), 'required' => false)),
      'created_at'         => new sfValidatorDateTime(),
      'updated_at'         => new sfValidatorDateTime(),
      'slug'               => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

    $this->validatorSchema->setPostValidator(
      new sfValidatorDoctrineUnique(array('model' => 'ViviendasAlquileres', 'column' => array('slug')))
    );

    $this->widgetSchema->setNameFormat('viviendas_alquileres[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ViviendasAlquileres';
  }

}
